package com.wjw.rabbitmq.springbootorderrabbitmqconsumer.service.direct;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

@RabbitListener(queues = {"duanxin.direct.queue"})
@Service
//使用@Service或者使用@Component
public class DuanxinConsumerDirect {

    @RabbitHandler
    public void receiveMessage(String message){
        System.out.println("duanxin.direct---接收到的订单消息是："+message);
    }
}
